package com.wngbms.guava;

public class SyncAndReentrantLockDemo {

    public static void main(String[] args) {
        ShareResource shareResource = new ShareResource();

        new Thread(()->{
            for (int i = 0; i < 5; i++) {
                shareResource.printC();
            }
        },"C").start();

        new Thread(()->{
            for (int i = 0; i < 5; i++) {
                shareResource.printB();
            }
        },"B").start();

        new Thread(()->{
            for (int i = 0; i < 5; i++) {
                shareResource.printA();
            }
        },"A").start();
    }

}
